using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class Comment
{
readonly static Action<Comment,object>[] _SetValues=new Action<Comment,object>[]{(r,t)=>r.CommentDate=Reflection.ParseObject(t, r.CommentDate),(r,t)=>r.Content=Reflection.ParseObject(t, r.Content),(r,t)=>r.Effective=Reflection.ParseObject(t, r.Effective),(r,t)=>r.Farworks=Reflection.ParseObject(t, r.Farworks),(r,t)=>r.for_id=Reflection.ParseObject(t, r.for_id),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.ImageIndexs=Reflection.ParseObject(t, r.ImageIndexs),(r,t)=>r.Invalid=Reflection.ParseObject(t, r.Invalid),(r,t)=>r.Poster=Reflection.ParseObject(t, r.Poster),(r,t)=>r.project_id=Reflection.ParseObject(t, r.project_id),(r,t)=>r.ref_id=Reflection.ParseObject(t, r.ref_id),(r,t)=>r.Reply=Reflection.ParseObject(t, r.Reply),(r,t)=>r.Score=Reflection.ParseObject(t, r.Score),(r,t)=>r.Unhealthy=Reflection.ParseObject(t, r.Unhealthy),(r,t)=>r.user_id=Reflection.ParseObject(t, r.user_id),(r,t)=>r.Visible=Reflection.ParseObject(t, r.Visible)};
readonly static string[] _Columns=new string[]{"CommentDate","Content","Effective","Farworks","for_id","Id","ImageIndexs","Invalid","Poster","project_id","ref_id","Reply","Score","Unhealthy","user_id","Visible"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"CommentDate", this.CommentDate);
AppendValue(action,"Content", this.Content);
AppendValue(action,"Effective", this.Effective);
AppendValue(action,"Farworks", this.Farworks);
AppendValue(action,"for_id", this.for_id);
AppendValue(action,"Id", this.Id);
AppendValue(action,"ImageIndexs", this.ImageIndexs);
AppendValue(action,"Invalid", this.Invalid);
AppendValue(action,"Poster", this.Poster);
AppendValue(action,"project_id", this.project_id);
AppendValue(action,"ref_id", this.ref_id);
AppendValue(action,"Reply", this.Reply);
AppendValue(action,"Score", this.Score);
AppendValue(action,"Unhealthy", this.Unhealthy);
AppendValue(action,"user_id", this.user_id);
AppendValue(action,"Visible", this.Visible);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[16];
cols[0]= RecordColumn.Column("CommentDate",this.CommentDate);
cols[1]= RecordColumn.Column("Content",this.Content);
cols[2]= RecordColumn.Column("Effective",this.Effective);
cols[3]= RecordColumn.Column("Farworks",this.Farworks);
cols[4]= RecordColumn.Column("for_id",this.for_id);
cols[5]= RecordColumn.Column("Id",this.Id);
cols[6]= RecordColumn.Column("ImageIndexs",this.ImageIndexs);
cols[7]= RecordColumn.Column("Invalid",this.Invalid);
cols[8]= RecordColumn.Column("Poster",this.Poster);
cols[9]= RecordColumn.Column("project_id",this.project_id);
cols[10]= RecordColumn.Column("ref_id",this.ref_id);
cols[11]= RecordColumn.Column("Reply",this.Reply);
cols[12]= RecordColumn.Column("Score",this.Score);
cols[13]= RecordColumn.Column("Unhealthy",this.Unhealthy);
cols[14]= RecordColumn.Column("user_id",this.user_id);
cols[15]= RecordColumn.Column("Visible",this.Visible);
return cols;
}

}
}

